 
import os
from pocketsphinx import Pocketsphinx, get_model_path
model_path = get_model_path()

config = {
    'hmm': os.path.join(model_path, 'en-us'),
    'lm': os.path.join(model_path, 'en-us.lm.bin'),
    'dict': os.path.join(model_path, 'cmudict-en-us.dict')
}

ps = Pocketsphinx(**config)
# 替换为你的实际音频文件路径
audio_file='d:\\恒星\\ScopinKordhell.mp3'
ps.decode(
    audio_file=audio_file,
    buffer_size=2048,
    no_search=False,
    full_utt=False
)

print('识别结果:', ps.hypothesis())